package pl.grumpy.tvforecast;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class MainActivity extends Activity {
	 

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);

//		final TextView title = (TextView) findViewById(R.id.title);
//		final ListView listView = (ListView) findViewById(R.id.list);

	}


	// menu na podstawie /res/menu/main_menu.xml
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.main_menu, menu);
		return true;
	}

	// zdarzenia menu
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.itemAddTVSeries:
			startActivity(new Intent(getApplicationContext(),
					Search4SeriesActivity.class));
			break;
		default:
			break;
		}
		return true;
	}

}